
from PIL import Image


def  Yolo_resize(path,outsize = (416,416)):
     image = Image.open(path) 
     temp = max(image.size)
     mask = Image.new(mode='RGB',size=(temp,temp),color=(0,0,0))
     mask.paste(image,(0,0))
     mask = mask.resize(outsize)
     return mask

